Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to put API at the center #28

Merged
merged 1 commit into from
Jun 20, 2021
Merged

Refactor to put API at the center #28

merged 1 commit into from
Jun 20, 2021

Conversation

nedbat
Copy link
Owner

@nedbat nedbat commented Dec 30, 2020

This is a work in progress.

The code has been refactored to produce a public API in the classes in scriv.py (Fragment, Changelog, and Scriv). The create and collect CLI commands use the API.

Some things that are not yet done:

  • Documentation. Even the docstrings are just single-line notes.
  • I'm not sure what to do about logging. The API doesn't log. Is that OK?
  • Checks for missing directories and overwriting existing fragments are in the CLI code, not the API. Is that right?

The big question of course: is this a useful API? Does it match your idea of what it should be shaped like?

@webknjaz
Copy link
Contributor

This is a work in progress.

FYI GitHub has a feature of Draft PRs, it signals the status even better (that "Open" label on top would show up as "Draft")

@nedbat nedbat marked this pull request as draft December 31, 2020 00:20
@brettcannon
Copy link

@nedbat would you like any help with this PR to help push this API over the finish line?

@nedbat
Copy link
Owner Author

nedbat commented Jun 6, 2021

@brettcannon it's just a matter of where the item is in the priority list... Will you be using scriv?

@brettcannon
Copy link

I would like to use it for https://github.com/brettcannon/python-launcher. Having the API would let me generate the release notes per release on GitHub releases as well as the overall changelog. I don't know how much churn there will be on this project, though, in terms of being a "heavy" user of scriv.

But I do understand this being about priorities. If you are looking for a code review or something I'm happy to help out.

The scriv.scriv module has Scriv, Changelog, and Fragment classes.
@nedbat
Copy link
Owner Author

nedbat commented Jun 20, 2021

I'll merge this and release it. Let me know if you use it, what needs to change.

@nedbat nedbat marked this pull request as ready for review June 20, 2021 23:05
@nedbat nedbat merged commit 8954166 into master Jun 20, 2021
@nedbat nedbat deleted the nedbat/api branch June 20, 2021 23:07
@nedbat
Copy link
Owner Author

nedbat commented Jun 22, 2021

This is now released as 0.11.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants